<?
require "db.php";

$id = $_GET['id'];
if ($id)
{
    $sql = "select * from headlines where id = {$id};";
    $rows = $db->query($sql)->fetchAll();
    $data = json_encode($rows[0], JSON_UNESCAPED_UNICODE);
    echo $data;
}
